#pragma once

#include <iostream>
#include <string>
#include <functional>
#include "log.hpp"

typedef std::function<int(int, int)> func_t;

class Task
{
private:
    func_t func_;
    int x_;
    int y_;

public:
    Task(int x, int y, func_t func)
        : x_(x), y_(y), func_(func)
    {
    }
    void operator()(const std::string &name)
    {
        logMessage(DEBUG, "%s: %d + %d = %d", name.c_str(), x_, y_, func_(x_, y_));
    }
};
